﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BuXiaChu.OrderDishes.Model;
using BuXiaChu.OrderDishes.BLL;
using BuXiaChu.OrderDishes.BLL.Constants;

namespace BuXiaChu.OrderDishes.Web.ServiceStation
{
    public partial class Index : System.Web.UI.Page
    {
        protected List<EmployeesModel> employeeList = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            InitData();
        }

        private void InitData()
        {
            employeeList = EmployeesManager.GetEmployeesByJobTitle(CodeDictionaryConstants.DeliveryGuys);
            sel_Employees.Items.Add(new ListItem("-请选择-", "-1"));
            employeeList.ForEach(
                item =>
                {
                    if (item.Status != 255)
                    {
                        var listItem = new ListItem(item.Name, item.Id.ToString());
                        sel_Employees.Items.Add(listItem);
                    }
                }
                );
        }
    }
}
